/*
Author: Maciej Oczko
Date: Janueary 2012
*/

#ifndef GLTEXTURE_H
#define GLTEXTURE_H

#include <cassert>

#include "Texture.h"
#include "Trace.h"
#include <GL/glut.h>
#include "../external/soil/src/SOIL.h"
#include "Utils.h"

class GLTexture : public Texture
{
private:
	// DirectX texture pointer
	GLuint m_pTexture;

	bool Load();
public:
	GLTexture() : m_pTexture(0) {}
	virtual ~GLTexture();

	// loads texture from file
	bool Load(std::wstring p_FilePath);
	// unloads texture
	void Unload();
	// reloads texture
	bool Reload();

	GLuint GetTexture() { Resource::Touch(); return m_pTexture; } 
	// get size of texture in memory
	size_t GetSize();
};

#endif